package br.ita.doacoes.core.cadastrofamilia.dao;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class JPAUtil{

	private static EntityManagerFactory emf;
	private static String nome;
	public JPAUtil(String texto){
		this.nome = texto;
	}
	static {
		emf = Persistence.createEntityManagerFactory(nome);
	}

	public static EntityManager getEntityManager() {
		return emf.createEntityManager();
	}
}
